<!-- /* Description for file.
 * 右栏办公室首页表格+在线用户
 *
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    ues/app/views/enterprises
 * @since         ues
 * @version       V0.0.1
 * @modifiedby    张海杰2011年0601
 * @lastmodified  张朋2011年0708
 */-->

<?php
echo $html->css ( 'tab' );
echo $html->css ( 'tree' );
?>
<script type="text/javascript">

 function ExChgClsName(Obj,NameA,NameB){
  var Obj=document.getElementById(Obj)?document.getElementById(Obj):Obj;
  Obj.className=Obj.className==NameA?NameB:NameA;
 }
 function showMenu(iNo){
 ExChgClsName("Menu_"+iNo,"MenuBox","MenuBox2");
 }

</script>
<!-- 导航菜单 -->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle" width=""></td>
		<td class="tabmenubarcontent"><?php echo __("YourPosition");echo "："; //echo __($nowPosition)?></td>
	</tr>
</table>
</div>

<!-- 列表区域-包含“最新公告”“设备使用情况”等 -->
<div class="tab_">

<!-- 最新公告 -->
<div id=nav>
<table width="100%" cellpadding="0" cellspacing="0" >
	<tr>
		<td width="70px"><?php echo __("LatestNotices");?></td>
		<td></td>
		<td width="30px"><?php echo $html->link(__("more", true), array('controller'=>'notices','action'=>'allinfo')); ?></td>
	</tr>
</table>

<table width="100%" cellpadding="0" cellspacing="0" class="tab1">
	<tr>
		<th ><?php echo __("Subject");?></th>
		<th width="120px" ><?php echo __("CreateTime");?></th>
	</tr>
	<!-- Here's where we loop through our $Notes array, printing out post info --> 
	<?php foreach ($notices as $notice): ?>
		<tr class=normal onmouseover='this.className= "over " '
			onmouseup='this.className= "over " '
			onmouseout='this.className= "normal " '>
			<td><?php echo $html->link($notice['Notice']['title'],array('controller'=>'notices','action'=>'view', 'id'=>$notice['Notice']['id']));?></td>
			<td><?php echo $notice['Notice']['created']; ?></td>
		</tr> 
	<?php endforeach; ?>  
</table>
</div>
<!-- 最新公告 --> 

<!-- 设备使用情况 -->
<div id=nav>
<table width="100%" cellpadding="0" cellspacing="0" class="tab_">
	<tr>
		<td width="100px"><?php echo __("EquipmentUseInfo");?></td>
		<td></td>
		<td width="60px">
			<?php
			echo $html->link(__("BookEquipment", true), array('controller'=>'resourcebooks','action'=>'')); ?>
		</td>
	</tr>
</table>

<table width="100%" cellpadding="0" cellspacing="0" class="tab1">
	<tr>
		<th><?php echo __("Subject");?></th>
		<th><?php echo __("EquipmentName");?></th>
		<th  width="120px" ><?php echo __("StartUseTime");?></th>
		<th  width="120px" ><?php echo __("EndUseTime");?></th>
	</tr>
	<?php foreach ($resourcebooks as $resourcebook): ?>
		<tr class=normal onmouseover='this.className= "over " '
			onmouseup='this.className= "over " '
			onmouseout='this.className= "normal " '>
			<td><?php echo $html->link($resourcebook['Resourcebook']['title'],array('controller'=>'Resourcebooks', 'action'=>'view', 'id'=>$resourcebook['Resourcebook']['id']));?>                 </td>
			<td><?php echo $resourcebook['Resourcebook']['resource']; ?></td>
			<td><?php echo $resourcebook['Resourcebook']['startTime']; ?></td>
			<td><?php echo $resourcebook['Resourcebook']['endTime']; ?></td>
		</tr> 
	<?php endforeach; ?> 
</table>

</div>
<!-- 设备使用情况 -->

<!-- 今日日程 -->
<div id=nav1>
<table width="100%" cellpadding="0" cellspacing="1" class="title">
	<tr>
		<td width="70px"><?php echo $html->link(__("TodayAgenda", true), array('controller'=>'schedules','action'=>'todaySchedule')); ?></td>
		<td width="70px"><?php echo $html->link(__("WeeklyAgenda", true),array('controller'=>'schedules','action'=>'weekSchedule')); ?></td>
		<td width="70px"><?php echo $html->link(__("AddAgenda", true), array('controller'=>'schedules','action'=>'addinit')); ?></td>
		<td></td>
	</tr>
</table>

<table width="100%" cellpadding="0" cellspacing="0" class="tab1">
	<tr>
		<th width="30%"><?php echo __("Subject");?></th>
		<th width="120px" ><?php echo __("StartUseTime");?></th>
		<th width="10%"><?php echo __("Sender");?></th>
		<th width="40%"><?php echo __("Content");?></th>
	</tr>
	<?php foreach ($schedules as $schedule): ?>
		<tr class=normal onmouseover='this.className= "over "'
			onmouseup='this.className= "over "'
			onmouseout='this.className= "normal "'>
			<td><?php echo $html->link($schedule['Schedule']['title'],array('controller'=>'schedules','action'=>'view', 'id'=>$schedule['Schedule']['id']));?>                 </td>
			<td><?php echo $schedule['Schedule']['startDate']; ?></td>
			<td><?php echo $schedule['Schedule']['transcendPerson']; ?></td>
			<td><?php echo $schedule['Schedule']['context']; ?></td>
		</tr> 
	<?php endforeach; ?> 
</table>
</div>
<!-- 今日日程 -->

<!-- 今日面试 -->
<div id=nav1>
<table width="100%" cellpadding="0" cellspacing="1" class="title">
	<tr>
		<td width="70px"><?php echo $html->link(__("TodayInterview", true), array('controller'=>'interviewrecords','action'=>'todayInterview'));?></td>
		<td width="70px"><?php echo $html->link(__("WeeklyInterview", true), array('controller'=>'interviewrecords','action'=>'weekInterview')); ?></td>
		<td></td>
	</tr>
</table>

<table width="100%" cellpadding="0" cellspacing="0" class="tab1">
	<tr>
		<th width="30%"><?php echo __("Subject");?></th>
		<th  width="120px" ><?php echo __("StartUseTime");?></th>
		<th width="10%"><?php echo __("Sender");?></th>
		<th width="40%"><?php echo __("Content");?></th>
	</tr>
	<?php foreach ($interviewrecords as $interviewrecord): ?>
		<tr class=normal onmouseover='this.className= "over " '
			onmouseup='this.className= "over " '
			onmouseout='this.className= "normal " '>
			<td><?php echo $html->link($interviewrecord['Interviewrecord']['title'],array('action'=>'view', 'id'=>$interviewrecord['Interview']['id']));?>                 </td>
			<td><?php echo $interviewrecord['Interviewrecord']['startDate']; ?></td>
			<td><?php echo $interviewrecord['Interviewrecord']['transcendPerson']; ?></td>
			<td><?php echo $interviewrecord['Interviewrecord']['context']; ?></td>
		</tr> 
	<?php endforeach; ?> 
</table>
</div>
<!-- 今日面试 -->

<!-- 潜在客户 -->
<div id=nav1>
<table width="100%" cellpadding="0" cellspacing="1" class="title">
	<tr>
		<td width="70px"><?php echo $html->link(__("LatentCustomer", true), array('controller'=>'companymanages','action'=>'latentCustomer')); ?></td>
		<td width="70px"><?php echo $html->link(__("SignedCustomer", true), array('controller'=>'companymanages','action'=>'signedCustomer')); ?></td>
		<td width="70px"><?php echo $html->link(__("AddCustomer", true), array('controller'=>'companymanages','action'=>'add')); ?></td>
		<td></td>
	</tr>
</table>

<table width="100%" cellpadding="0" cellspacing="0" class="tab1">
	<tr>
		<th width="30%"><?php echo __("Subject");?></th>
		<th  width="120px" ><?php echo __("StartUseTime");?></th>
		<th width="10%"><?php echo __("Sender");?></th>
		<th width="40%"><?php echo __("Content");?></th>
	</tr>
	<?php foreach ($companymanages as $companymanage): ?>
		<tr class=normal onmouseover='this.className= "over " '
			onmouseup='this.className= "over " '
			onmouseout='this.className= "normal " '>
			<td><?php echo $html->link($companymanage['Companymanage']['title'],array('action'=>'initDetail', 'id'=>$companymanage['Companymanage']['id']));?>                 </td>
			<td><?php echo $companymanage['Companymanage']['startTime']; ?></td>
			<td><?php echo $companymanage['Companymanage']['transcendPerson']; ?></td>
			<td><?php echo $companymanage['Companymanage']['context']; ?></td>
		</tr> 
	<?php endforeach; ?> 
</table>
</div>
<!-- 潜在客户 -->

<!-- 项目列表 -->

<div id=nav1>
<table width="100%" cellpadding="0" cellspacing="1" class="title">
	<tr>
		<td width="70px"><?php echo __("ProjectList");?></td>
		<td width="70px"><?php echo $html->link(__("AddProject", true), array('controller'=>'projectmanagements','action'=>'add')); ?></td>
		<?php 
  if($isshow==1)
  {
?>
		<td width="70px"><?php echo $html->link(__("AllProject", true), array('controller'=>'projectmanagements','action'=>'allinfo')); ?></td>
<?php }?>		
		<td></td>
	</tr>
</table>

<table width="100%" cellpadding="0" cellspacing="0" class="tab1">
	<tr>
		<th width="30%"><?php echo __("Subject");?></th>
		<th  width="120px" ><?php echo __("StartUseTime");?></th>
		<th width="10%"><?php echo __("Sender");?></th>
		<th width="40%"><?php echo __("Content");?></th>
	</tr>
	<?php foreach ($projectmanagements as $projectmanagement): ?>
		<tr class=normal onmouseover='this.className= "over " '
			onmouseup='this.className= "over " '
			onmouseout='this.className= "normal " '>
			<td><?php echo $html->link($projectmanagement['Projectmanagement']['title'],array('action'=>'view', 'id'=>$projectmanagement['Projectmanagement']['id']));?>                 </td>
			<td><?php echo $projectmanagement['Projectmanagement']['projectDate']; ?></td>
			<td><?php echo $projectmanagement['Projectmanagement']['projectDate']; ?></td>
			<td><?php echo $projectmanagement['Projectmanagement']['projectDate']; ?></td>
		</tr> 
	<?php endforeach; ?> 
</table>
</div>
<!-- 项目列表 -->
</div>

<div id="right-2">
<!-- 用户列表开始 -->
<div id="userlist">
<table width="100%" cellpadding="0" cellspacing="1" class="title">
	<tr>
		<th width="90px"><?php echo __("OnlineUsers");?></th>
		<th></th>
	</tr>
</table>

<div class="tree">
<h3></h3>
<div class="TreeWrap">
	<?php $i = 0;?>
	<?php foreach ($onlineUserDepartments as $k => $onlineUserDepartment){
			$i++;?>
		<div class="MenuBox" id="Menu_<?php echo $i;?>">
			<div class="titBox">
				<h3 class="Fst"><a href="javascript:showMenu(<?php echo $i;?>);"><?php echo $onlineUserDepartment;?></a></h3>
			</div>
			<div class="txtBox">
				<ul>
					<?php foreach ($onlineUsers[$k] as $onlineUser){
						$i++;?>
						<li><a href="#"><?php echo $onlineUser;?></a></li>
					<?php } ?> 
				</ul>
			</div>
		</div>
	<?php } ?> 
	
<!--MenuBox-->
</div>
</div>
</div>
